package com.mp.common;

import lombok.Data;

/**
 *  自定义异常类
 * @author: notejava
 * @date: 2020/8/14
 */
@Data
public class BaseUncheckException extends RuntimeException{
    private Integer code;
    private String msg;

    public BaseUncheckException(){

    }
    public BaseUncheckException(Integer code,String msg){
        this.code=code;
        this.msg=msg;
    }
    public static BaseUncheckException fail(String msg){
        return new BaseUncheckException(Code.EXCEPTION.getStatus(),msg);
    }


}
